<%@page import="model.ViewProduct"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ include file="MainBricks/includeStuff.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Atrium Home Page</title>
<link href="style/style.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"
	type="text/css" media="all" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/addfields.js"></script>
</head>
<body>
	<script>	
		var contor = 0;
		function addAutocomplete() {			
			contor += 1;
			$("#autocompleteinput" + contor).autocomplete({
				source :
				${productsNames}
		});
		}
		$(document).ready(function() {
			$("#fromDateId").datepicker({
				dateFormat : 'yy-mm-dd'
			});
			$("#toDateId").datepicker({
				dateFormat : 'yy-mm-dd'
			});
		});
	</script>
	<div id="wrapper">
		<%@ include file="MainBricks/header.jsp"%>
		<!-- end #header -->
		<%@ include file="MainBricks/topmenu.jsp"%>
		<!-- end #menu -->
		<div id="page">
			<div id="page-bgtop">
				<div id="page-bgbtm">
					<div id="content">
						<%@ include file="MainBricks/includeinContent.jsp"%>
						<fieldset>
							<legend><c:out value="${title}"></c:out></legend>
							<form action="${pathToSubmit}" target="_blank" method="post" name="selectperiod" class="stockform">
								<table style="width: 60%;" align="center">
									<tr>
										<td>From:</td>
										<td><input type="text" name="fromDate" id="fromDateId" value="" required="required" /></td>
									</tr>
									<tr>
										<td>To:</td>
										<td><input type="text" name="toDate" id="toDateId" value="" required="required" /></td>
									</tr>

								</table>
								<br>
								<center>
									<a onclick='addTextBox(); addAutocomplete()' href='#'>Adauga Produs </a> &nbsp;&nbsp;|&nbsp;&nbsp; <a
										onclick='removeElement(); removeAutoComplete()' href='#'>Sterge Produs</a>
								</center>
								<br>
								<table id="area" style="width: 60%;" align="center">
								</table>

								<span style="float: right; margin-right: 120px" class="submit"><br> <input type="submit"
									name="View" value=View /></span>

							</form>
						</fieldset>
					</div>
					<!-- end #content -->
					<%@ include file="MainBricks/leftmenu.jsp"%>
					<!-- end #sidebar -->
					<div style="clear: both;">&nbsp;</div>
				</div>
			</div>
		</div>
		<!-- end #page -->
	</div>
	<%@ include file="MainBricks/footer.jsp"%>
	<!-- end #footer -->
</body>
</html>